<template>
  <d2-container>
    <el-tabs v-model="activeName" @tab-click="handleClick">
    <el-tab-pane label="期初数据导入" name="first">
    <el-card shadow="never" class="d2-mb">
      <el-form class="filter-container" ref="egForm" :model="egForm" label-width="100px">
          <el-row :gutter="20">
            <el-col :span="4">
              <el-form-item label="客户号">
                <el-select v-model="value" placeholder="请选择">
                   <el-option
                       v-for="item in options1"
                       :key="item.value"
                       :label="item.label"
                       :value="item.value">
                     </el-option>
                </el-select>
              </el-form-item>
            </el-col>
             <el-col :span="4">
                <el-form-item label="交易日期">
               <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="客户名称">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="期货公司名称">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="2" style='margin-top:4px;'>
              <el-button type="primary" size="small">
                <d2-icon name="search"/> 查询
              </el-button>
            </el-col>
          </el-row>
      </el-form>
    </el-card>
    <el-upload :before-upload="handleUpload" action="default" class='mb'>
        <el-button type="default" size="small">
          <d2-icon name="download"/>
          导入
        </el-button>
        <el-button type="default" size="small" @click="exportExcel">
          <d2-icon name="upload"/>
          导出
      </el-button>
      <el-button type="default" size="small" @click="handleCleanCacheAndRefreshCurrent">
        <d2-icon name="refresh"/>
        刷新
      </el-button>
    </el-upload>
    <el-card shadow="never" class="d2-mb titleline">
     <template slot="header" style="height:66px;">
        <span class="title_x el-button--primary fl"></span>
         <p class="title_l fl">期权资金信息</p>
     </template>
       <el-table
              ref="multipleriskTj"
              :data="riskTjListData"
              highlight-current-row
              @current-change="handleCurrentChange_dx"
              border
              fit
              class="bra"
              style="width: 100%">
        <el-table-column
                label="风控说明"
                prop="riskExplain"
                sortable>
        </el-table-column>
        <el-table-column
                label="风控类型"
                prop="riskType"
                width="95"
                sortable>
        </el-table-column>
        <el-table-column label="风控对象">
          <el-table-column
                  label="交易所"
                  prop="exchangeID"
                  sortable>
          </el-table-column>
          <el-table-column
                  label="品种"
                  prop="productID"
                  sortable>
          </el-table-column>
          <el-table-column
                  label="合约"
                  prop="instrumentID"
                  sortable>
          </el-table-column>
        </el-table-column>
        <el-table-column
                label="风控粒度"
                prop="riskLevel"
                width="95"
                sortable>
        </el-table-column>
        <el-table-column
                label="风控指标"
                prop="riskFormulaName"
                sortable>
        </el-table-column>
        <el-table-column
                label="比较"
                prop="riskCompare"
                width="70"
                sortable>
        </el-table-column>
        <el-table-column
                label="阈值"
                prop="riskThreshold"
                sortable>
        </el-table-column>
        <el-table-column
                label="操作"
                prop="riskOperateName"
                sortable>
        </el-table-column>
        <el-table-column
                label="减仓指标"
                prop="reductionFormulaName"
                sortable>
        </el-table-column>
        <el-table-column
                label="减仓阈值"
                prop="reductionThreshold"
                sortable>
        </el-table-column>
        <el-table-column label="生效净值">
          <el-table-column
                  label="净值类型"
                  prop="netFlag"
                  sortable>
          </el-table-column>
          <el-table-column
                  label="下限"
                  prop="netStart"
                  sortable>
          </el-table-column>
          <el-table-column
                  label="上限"
                  prop="netEnd"
                  sortable>
          </el-table-column>
        </el-table-column>
      </el-table>
    </el-card>
     <el-card shadow="never" class="d2-mb titleline">
      <template slot="header" style="height:66px;">
        <span class="title_x el-button--primary fl"></span>
         <p class="title_l fl">期权成交明细</p>
     </template>
      <d2-crud
      :columns="col_qqcjTable"
      :data="qqcjTable"
      :options="options"
      @selection-change="handleSelectionChange"/>
    </el-card>
    <el-card shadow="never" class="d2-mb titleline">
      <template slot="header" style="height:66px;">
        <span class="title_x el-button--primary fl"></span>
         <p class="title_l fl">期权持仓明细</p>
     </template>
      <d2-crud
      :columns="col_qqccTable"
      :data="qqccTable"
      :options="options"
      @selection-change="handleSelectionChange"/>
    </el-card>
     <el-card shadow="never" class="d2-mb titleline">
      <template slot="header" style="height:66px;">
        <span class="title_x el-button--primary fl"></span>
         <p class="title_l fl">期权持仓汇总</p>
     </template>
      <d2-crud
      :columns="col_qqcchzTable"
      :data="qqcchzTable"
      :options="options"
      @selection-change="handleSelectionChange"/>
    </el-card>
    </el-tab-pane>
    <el-tab-pane label="期权成交" name="second">
         <el-card shadow="never" class="d2-mb">
      <el-form class="filter-container" ref="egForm" :model="egForm" label-width="100px">
          <el-row :gutter="20">
             <el-col :span="6">
                 <el-form-item label="交易日期">
                <el-col :span="11">
                  <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
                </el-col>
                <el-col class="line tc" :span="2">~</el-col>
                <el-col :span="11">
                  <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
                </el-col>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="客户号">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="合约">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="开/平">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="数据来源">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="成交序号">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="2" style='margin-top:4px;'>
              <el-button type="primary" size="small">
                <d2-icon name="search"/> 查询
              </el-button>
            </el-col>
          </el-row>
      </el-form>
    </el-card>
    <div class='mb'>
       <el-button type="default" size="small" @click="handleFilter_addQqcj">
          <d2-icon name="plus"/>
          新增
        </el-button>
        <el-button type="default" size="small" @click="handleFilter_editQqcj">
          <d2-icon name="edit"/>
          修改
        </el-button>
        <el-button type="default" size="small" icon="el-icon-delete"  @click="handleFilter_delQqcj">
          删除
        </el-button>
         <el-button type="default" size="small" @click="handleFilter_lookQqcj">
          <i class="fa fa-eye" aria-hidden="true"></i>
          查看
        </el-button>
         <el-button type="default" size="small" @click="handleFilter_copyQqcj">
          <i class="fa fa-clipboard" aria-hidden="true"></i>
          复制
        </el-button>
         <el-button type="default" size="small">
          <i class="fa fa-gavel" aria-hidden="true"></i>
          读取成交
        </el-button>
      <el-button type="default" size="small" @click="handleFormSubmit">
         <i class="fa fa-envelope-open-o" aria-hidden="true"></i>
         全部已读
      </el-button>
       <el-button type="default" size="small">
          <d2-icon name="download"/>
          导入
        </el-button>
      <el-button type="default" size="small" @click="handleCleanCacheAndRefreshCurrent">
        <d2-icon name="refresh"/>
        刷新
      </el-button>
       <el-button type="default" size="small" @click="handleFilter_adjustQqcj">
          <i class="fa fa-exchange" aria-hidden="true"></i>
          调整
        </el-button>
        <el-button type="default" size="small" @click="exportExcel">
          <d2-icon name="upload"/>
          导出
      </el-button>
    </div>
    <el-card shadow="never" class="d2-mb titleline">
      <template slot="header" style="height:66px;">
        <span class="title_x el-button--primary fl"></span>
         <p class="title_l fl">成交记录</p>
     </template>
      <d2-crud
       class="cb"
      :columns="col_cjTable"
      :data="cjTable"
      :options="options"
      selection-row
      @selection-change="handleSelectionChange"/>
    </el-card>
    </el-tab-pane>
    <el-tab-pane label="期权资金管理" name="third">
      <el-card shadow="never" class="d2-mb">
      <el-form class="filter-container" ref="egForm" :model="egForm" label-width="100px">
          <el-row :gutter="20">
            <el-col :span="4">
              <el-form-item label="期权">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="4">
                 <el-form-item label="交易日期">
                  <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="2" style='margin-top:4px;'>
              <el-button type="primary" size="small">
                <d2-icon name="search"/> 查询
              </el-button>
            </el-col>
          </el-row>
      </el-form>
    </el-card>
    <el-upload :before-upload="handleUpload" action="default" class='mb'>
        <el-button type="default" size="small">
          <d2-icon name="download"/>
          导入
        </el-button>
        <el-button type="default" size="small" @click="exportExcel">
          <d2-icon name="upload"/>
          导出
      </el-button>
      <el-button type="default" size="small" @click="handleCleanCacheAndRefreshCurrent">
        <d2-icon name="refresh"/>
        刷新
      </el-button>
    </el-upload>
    <el-card shadow="never" class="d2-mb titleline">
      <template slot="header" style="height:66px;">
        <span class="title_x el-button--primary fl"></span>
         <p class="title_l fl">资金信息</p>
     </template>
      <d2-crud
      :columns="col_zjTable"
      :data="zjTable"
      :options="options"
      selection-row
      @selection-change="handleSelectionChange"/>
    </el-card>
    </el-tab-pane>
    <el-tab-pane label="期权持仓汇总" name="fourth">
       <el-card shadow="never" class="d2-mb">
      <el-form class="filter-container" ref="egForm" :model="egForm" label-width="100px">
          <el-row :gutter="20">
            <el-col :span="4">
              <el-form-item label="期权">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="6">
                 <el-form-item label="交易日期">
                <el-col :span="11">
                  <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
                </el-col>
                <el-col class="line tc" :span="2">~</el-col>
                <el-col :span="11">
                  <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
                </el-col>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="合约">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="方向">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label="数据来源">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="2" style='margin-top:4px;'>
              <el-button type="primary" size="small">
                <d2-icon name="search"/> 查询
              </el-button>
            </el-col>
          </el-row>
      </el-form>
    </el-card>
    <el-upload :before-upload="handleUpload" action="default" class='mb'>
        <el-button type="default" size="small">
          <d2-icon name="download"/>
          导入
        </el-button>
        <el-button type="default" size="small" @click="exportExcel">
          <d2-icon name="upload"/>
          导出
        </el-button>
        <el-button type="default" size="small" @click="handleCleanCacheAndRefreshCurrent">
          <d2-icon name="refresh"/>
          刷新
        </el-button>
    </el-upload>
    <el-card shadow="never" class="d2-mb titleline">
      <template slot="header" style="height:66px;">
        <span class="title_x el-button--primary fl"></span>
         <p class="title_l fl">持仓汇总</p>
     </template>
      <d2-crud
      :columns="col_qqcchzTable"
      :data="qqcchzTable"
      :options="options"
      selection-row
      @selection-change="handleSelectionChange"/>
    </el-card>
    </el-tab-pane>
    <el-tab-pane label="期权数据导入管理" name="fifth">
       <el-card shadow="never" class="d2-mb">
      <el-form class="filter-container" ref="egForm" :model="egForm" label-width="100px">
          <el-row :gutter="20">
            <el-col :span="4">
              <el-form-item label="客户号">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="6">
                 <el-form-item label="交易日期">
                <el-col :span="11">
                  <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
                </el-col>
                <el-col class="line tc" :span="2">~</el-col>
                <el-col :span="11">
                  <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
                </el-col>
              </el-form-item>
            </el-col>
             <el-col :span="6">
                 <el-form-item label="导入时间">
                <el-col :span="11">
                  <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
                </el-col>
                <el-col class="line tc" :span="2">~</el-col>
                <el-col :span="11">
                  <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker>
                </el-col>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="客户名">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
             <el-col :span="4">
              <el-form-item label="期货公司名称">
                 <el-input
                   placeholder="请输入内容"
                   v-model="input"
                   clearable>
                 </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="2" style='margin-top:4px;'>
              <el-button type="primary" size="small">
                <d2-icon name="search"/> 查询
              </el-button>
            </el-col>
          </el-row>
      </el-form>
    </el-card>
    <el-upload :before-upload="handleUpload" action="default" class='mb'>
        <el-button type="default" size="small">
          <d2-icon name="download"/>
          导入
        </el-button>
        <el-button type="default" size="small" @click="exportExcel">
          <d2-icon name="upload"/>
          导出
        </el-button>
        <el-button type="default" size="small" @click="handleCleanCacheAndRefreshCurrent">
          <d2-icon name="refresh"/>
          刷新
        </el-button>
    </el-upload>
    <el-card shadow="never" class="d2-mb titleline">
      <template slot="header" style="height:66px;">
        <span class="title_x el-button--primary fl"></span>
         <p class="title_l fl">导入明细</p>
     </template>
      <d2-crud
      :columns="col_drTable" 
      :data="drTable"
      :options="options"
      selection-row
      @selection-change="handleSelectionChange"/>
    </el-card>
    </el-tab-pane>
  </el-tabs>
  <!-- 新增 -->
    <el-dialog title="期权成交管理" class="tc" :visible.sync="handleFilter_addQqcjVisible">
      <el-form ref="egForm" :model="egForm" label-width="70px">
        <el-row>
          <!-- <el-col :span="24">
            <p class="table-title tl"><span class="b">|</span>风控规则</p>
          </el-col> -->
           <!-- <el-card shadow="never" class="d2-mb"> -->
        <div style="margin-bottom: 15px;" class="tl">成交明细</div>
        <div class="tl mb10">
          <el-button type="default" size="small" @click="addRow">
          <d2-icon name="plus" />
          增行
        </el-button>
        <el-button type="default" size="small" icon="el-icon-delete" @click="delData">
          删行
        </el-button>
        </div>
        <el-table :data="tableData" ref="table" tooltip-effect="dark" border stripe style="width: 93%" @selection-change='selectRow'>
              <el-table-column type="selection" width="45" align="center"></el-table-column>
              <el-table-column label="序号"  type="index" width="60" align="center"></el-table-column>
              <el-table-column  label="客户号" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="日期">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="客户名称" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="期货公司名称">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交序号" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="成交日期">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="交易所" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="品名">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="合约" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="方向">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="开平" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="投保">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交价" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="手数">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交额" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="手续费">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="平仓盈亏" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="权利金收支">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
        </el-table>
        </el-row>
        <el-row>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="handleFilter_addQqcjVisible = false">取消</el-button>
        <el-button type="primary" @click="edit_Risk_OrderChange">保存</el-button>
      </div>
    </el-dialog>
  <!-- 修改 -->
    <el-dialog title="期权成交管理" class="tc" :visible.sync="handleFilter_editQqcjVisible">
      <el-form ref="egForm" :model="egForm" label-width="70px">
        <el-row>
        <el-table :data="tableData" ref="table" tooltip-effect="dark" border stripe style="width: 93%" @selection-change='selectRow'>
              <el-table-column label="序号"  type="index" width="60" align="center"></el-table-column>
               <el-table-column  label="是否调整" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column  label="客户号" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="日期">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="客户名称" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="期货公司名称">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交序号" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="成交日期">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="交易所" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="品名">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="合约" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="方向">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="开平" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="投保">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交价" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="手数">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交额" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="手续费">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="平仓盈亏" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="权利金收支">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
        </el-table>
        </el-row>
        <el-row>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="handleFilter_editQqcjVisible = false">取消</el-button>
        <el-button type="primary" @click="edit_Risk_OrderChange">保存</el-button>
      </div>
    </el-dialog>
  <!-- 复制 -->
   <el-dialog title="期权成交管理" class="tc" :visible.sync="handleFilter_copyQqcjVisible">
      <el-form ref="egForm" :model="egForm" label-width="70px">
        <el-row>
        <el-table :data="tableData" ref="table" tooltip-effect="dark" border stripe style="width: 93%" @selection-change='selectRow'>
              <el-table-column label="序号"  type="index" width="60" align="center"></el-table-column>
               <el-table-column  label="是否调整" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column  label="客户号" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="日期">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="客户名称" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="期货公司名称">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交序号" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="成交日期">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="交易所" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="品名">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="合约" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="方向">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="开平" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="投保">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交价" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="手数">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交额" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="手续费">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="平仓盈亏" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="权利金收支">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
        </el-table>
        </el-row>
        <el-row>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="handleFilter_editQqcjVisible = false">取消</el-button>
        <el-button type="primary" @click="edit_Risk_OrderChange">保存</el-button>
      </div>
    </el-dialog>
  <!-- 调整 -->
     <el-dialog title="期权成交管理" class="tc" :visible.sync="handleFilter_adjustQqcjVisible">
      <el-form ref="egForm" :model="egForm" label-width="70px">
        <el-row>
        <el-table :data="tableData" ref="table" tooltip-effect="dark" border stripe style="width: 93%" @selection-change='selectRow'>
              <el-table-column label="序号"  type="index" width="60" align="center"></el-table-column>
               <el-table-column  label="是否调整" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column  label="客户号" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="日期">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="客户名称" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="期货公司名称">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交序号" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="成交日期">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="交易所" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="品名">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="合约" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="方向">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="开平" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="投保">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交价" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="手数">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="成交额" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="手续费">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
               <el-table-column  label="平仓盈亏" align="center">
                <template slot-scope="scope">
                  <el-cascader prop="post_id" class="post_name" v-model="scope.row.post_id" :options="post_options" :show-all-levels="false" @change="test"></el-cascader>
                </template>
              </el-table-column>
              <el-table-column label="权利金收支">
                <template slot-scope="scope">
                  <el-input class="require_des" v-model="scope.row.require_des"></el-input>
                </template>
              </el-table-column>
        </el-table>
        </el-row>
        <el-row>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="handleFilter_editQqcjVisible = false">取消</el-button>
        <el-button type="primary" @click="edit_Risk_OrderChange">保存</el-button>
      </div>
    </el-dialog>
  </d2-container>
</template>

<script>
export default {
  // mixins: [
  //   list
  // ],
  data () {
    this.chartSettings = {
      roseType: 'radius'
    }
    this.chartSettings1 = {
      radius: 150,
      offsetY: 250
    }
    return {
        tableData: [],
        selectlistRow: [],
        rowNum:1,

      activeName: 'first',
// 1.期初数据导入
      // 期权资金信息
      col_qqzjTable: [
        {
          title: '上日结存',
          key: 'date',
          sortable: true
        },
        {
          title: '出入金',
          key: 'name',
          sortable: true
        },
        {
          title: '手续费',
          key: 'address',
          sortable: true
        },
        {
          title: '平仓盈亏',
          key: 'date',
          sortable: true
        },
        {
          title: '多头期权市值',
          key: 'name',
          sortable: true
        },
        {
          title: '权利金收入',
          key: 'address',
          sortable: true
        },
        {
          title: '当日结存',
          key: 'date',
          sortable: true
        },
        {
          title: '客户权益',
          key: 'name',
          sortable: true
        },
        {
          title: '保证金占用',
          key: 'address',
          sortable: true
        },
        {
          title: '持仓盈亏',
          key: 'date',
          sortable: true
        },
        {
          title: '空头期权市值',
          key: 'name',
          sortable: true
        },
        {
          title: '权利金支出',
          key: 'address',
          sortable: true
        },
        {
          title: '可用资金',
          key: 'date',
          sortable: true
        },
        {
          title: '风险度',
          key: 'name',
          sortable: true
        },
        {
          title: '总盈亏',
          key: 'address',
          sortable: true
        },
        {
          title: '市值权益',
          key: 'address',
          sortable: true
        },
        {
          title: '期权执行盈亏',
          key: 'address',
          sortable: true
        }
      ],
      // 期权成交明细
      col_qqcjTable: [
        {
          title: '成交日期',
          key: 'date',
          sortable: true
        },
        {
          title: '交易所',
          key: 'name',
          sortable: true
        },
        {
          title: '合约',
          key: 'address',
          sortable: true
        },
        {
          title: '方向',
          key: 'date',
          sortable: true
        },
        {
          title: '开平',
          key: 'name',
          sortable: true
        },
        {
          title: '投保',
          key: 'address',
          sortable: true
        },
        {
          title: '成交价',
          key: 'date',
          sortable: true
        },
        {
          title: '手数',
          key: 'name',
          sortable: true
        },
        {
          title: '成交额',
          key: 'address',
          sortable: true
        },
        {
          title: '手续费',
          key: 'date',
          sortable: true
        },
        {
          title: '平仓盈亏',
          key: 'name',
          sortable: true
        },
        {
          title: '权利金收支',
          key: 'address',
          sortable: true
        },
        {
          title: '成交序号',
          key: 'date',
          sortable: true
        }
      ],
      // 期权持仓明细
      col_qqccTable: [
        {
          title: '交易所',
          key: 'name',
          sortable: true
        },
        {
          title: '合约',
          key: 'address',
          sortable: true
        },
        {
          title: '方向',
          key: 'date',
          sortable: true
        },
        {
          title: '投保',
          key: 'address',
          sortable: true
        },
        {
          title: '手数',
          key: 'name',
          sortable: true
        },
        {
          title: '开仓价',
          key: 'address',
          sortable: true
        },
        {
          title: '开仓日期',
          key: 'date',
          sortable: true
        },
        {
          title: '昨结算',
          key: 'name',
          sortable: true
        },
        {
          title: '结算价',
          key: 'address',
          sortable: true
        },
        {
          title: '持仓盈亏',
          key: 'date',
          sortable: true
        },
        {
          title: '保证金',
          key: 'date',
          sortable: true
        },
        {
          title: '期权市值',
          key: 'date',
          sortable: true
        }
      ],
      // 期权持仓汇总
      col_qqcchzTable: [
        {
          title: '交易所',
          key: 'name',
          sortable: true
        },
        {
          title: '合约',
          key: 'address',
          sortable: true
        },
        {
          title: '买持',
          key: 'date',
          sortable: true
        },
        {
          title: '买均价',
          key: 'name',
          sortable: true
        },
        {
          title: '卖持',
          key: 'address',
          sortable: true
        },
        {
          title: '卖均价',
          key: 'date',
          sortable: true
        },
        {
          title: '昨结算',
          key: 'name',
          sortable: true
        },
        {
          title: '结算价',
          key: 'address',
          sortable: true
        },
        {
          title: '持仓盈亏',
          key: 'date',
          sortable: true
        },
        {
          title: '保证金占用',
          key: 'name',
          sortable: true
        },
        {
          title: '投保',
          key: 'address',
          sortable: true
        },
        {
          title: '多头期权市值',
          key: 'date',
          sortable: true
        },
        {
          title: '空头期权市值',
          key: 'date',
          sortable: true
        }
      ],
// 2.期权成交
      // 成交记录
      col_cjTable: [
        {
          title: '是否调整',
          key: 'date',
          sortable: true
        },
        {
          title: '客户号',
          key: 'address',
          sortable: true
        },
        {
          title: '日期',
          key: 'date',
          sortable: true
        },
        {
          title: '客户名称',
          key: 'name',
          sortable: true
        },
        {
          title: '期货公司名称',
          key: 'address',
          sortable: true
        },
        {
          title: '成交序号',
          key: 'date',
          sortable: true
        },
        {
          title: '成交日期',
          key: 'name',
          sortable: true
        },
        {
          title: '交易所',
          key: 'address',
          sortable: true
        },
        {
          title: '品名',
          key: 'date',
          sortable: true
        },
        {
          title: '合约',
          key: 'name',
          sortable: true
        },
        {
          title: '方向',
          key: 'address',
          sortable: true
        },
        {
          title: '开平',
          key: 'date',
          sortable: true
        },
        {
          title: '投保',
          key: 'name',
          sortable: true
        },
        {
          title: '成交价',
          key: 'address',
          sortable: true
        },
        {
          title: '手数',
          key: 'address',
          sortable: true
        },
        {
          title: '成交额',
          key: 'address',
          sortable: true
        },
        {
          title: '手续费',
          key: 'address',
          sortable: true
        },
        {
          title: '平仓盈亏',
          key: 'address',
          sortable: true
        },
        {
          title: '权利金收支',
          key: 'address',
          sortable: true
        }
      ],
// 3.期权资金管理
      //   资金信息
      col_zjTable: [
        {
          title: '客户号',
          key: 'address',
          sortable: true
        },
        {
          title: '日期',
          key: 'date',
          sortable: true
        },
        {
          title: '客户名称',
          key: 'name',
          sortable: true
        },
        {
          title: '期货公司名称',
          key: 'address',
          sortable: true
        },
        {
          title: '上日结存',
          key: 'date',
          sortable: true
        },
        {
          title: '出入金',
          key: 'name',
          sortable: true
        },
        {
          title: '手续费',
          key: 'address',
          sortable: true
        },
        {
          title: '平仓盈亏',
          key: 'date',
          sortable: true
        },
        {
          title: '多头期权市值',
          key: 'name',
          sortable: true
        },
        {
          title: '权利金收入',
          key: 'address',
          sortable: true
        },
        {
          title: '当日结存',
          key: 'date',
          sortable: true
        },
        {
          title: '客户权益',
          key: 'name',
          sortable: true
        },
        {
          title: '保证金占用',
          key: 'address',
          sortable: true
        },
        {
          title: '持仓盈亏',
          key: 'address',
          sortable: true
        },
        {
          title: '空头期权市值',
          key: 'address',
          sortable: true
        },
        {
          title: '权利金支出',
          key: 'address',
          sortable: true
        },
        {
          title: '可用资金',
          key: 'address',
          sortable: true
        },
        {
          title: '风险度',
          key: 'address',
          sortable: true
        },
        {
          title: '总盈亏',
          key: 'address',
          sortable: true
        },
        {
          title: '市值权益',
          key: 'address',
          sortable: true
        },
        {
          title: '期权执行盈亏',
          key: 'address',
          sortable: true
        }
      ],
// 4.期权持仓汇总
      // 持仓汇总
      col_qqcchzTable: [
        {
          title: '是否调整',
          key: 'date',
          sortable: true
        },
        {
          title: '客户号',
          key: 'address',
          sortable: true
        },
        {
          title: '日期',
          key: 'date',
          sortable: true
        },
        {
          title: '客户名称',
          key: 'name',
          sortable: true
        },
        {
          title: '期货公司名称',
          key: 'address',
          sortable: true
        },
        {
          title: '交易所',
          key: 'address',
          sortable: true
        },
        {
          title: '品名',
          key: 'date',
          sortable: true
        },
        {
          title: '合约',
          key: 'name',
          sortable: true
        },
        {
          title: '买持',
          key: 'date',
          sortable: true
        },
        {
          title: '买均价',
          key: 'name',
          sortable: true
        },
        {
          title: '卖持',
          key: 'address',
          sortable: true
        },
        {
          title: '卖均价',
          key: 'date',
          sortable: true
        },
        {
          title: '昨结算',
          key: 'name',
          sortable: true
        },
        {
          title: '结算价',
          key: 'address',
          sortable: true
        },
        {
          title: '持仓盈亏',
          key: 'address',
          sortable: true
        },
        {
          title: '保证金占用',
          key: 'address',
          sortable: true
        },
        {
          title: '投保',
          key: 'address',
          sortable: true
        },
        {
          title: '多头期权市值',
          key: 'address',
          sortable: true
        },
        {
          title: '空头期权市值',
          key: 'address',
          sortable: true
        }
      ],
// 5.期权数据导入管理
      // 导入明细
      col_drTable: [
        {
          title: '客户号',
          key: 'riskExplain',
          sortable: true
        },
        {
          title: '交易日期',
          key: 'riskExplain',
          sortable: true
        },
        {
          title: '导入时间',
          key: 'riskExplain',
          sortable: true
        },
        {
          title: '客户名称',
          key: 'riskExplain',
          sortable: true
        },
        {
          title: '期货公司名称',
          key: 'riskExplain',
          sortable: true
        }
      ],
      // 新增
      handleFilter_addQqcjVisible:false,
      columnSpot: [
        {
          title: "客户号",
          key: "date",
          sortable: true,
          component: {
            name: "el-select",
            options: [
              {
                value: "王小虎",
                label: "王小虎"
              },
              {
                value: "王中虎",
                label: "王中虎"
              },
              {
                value: "王老虎",
                label: "王老虎"
              }
            ],
            size: "small"
          }
        },
        {
          title: "日期*",
          key: "address",
          sortable: true,
          component: {
            name: "el-input",
            size: "small"
          }
        },
        {
          title: "客户名称*",
          sortable: true,
          key: "read",
          component: {
            name: "el-input",
            size: "small"
          }
        },
        {
          title: "成交序号*",
          sortable: true,
          key: "read",
          component: {
            name: "el-input",
            size: "small"
          }
        },
         {
          title: "成交日期*",
          sortable: true,
          key: "read",
          component: {
            name: "el-input",
            size: "small"
          }
        },
         {
          title: "交易所*",
          sortable: true,
          key: "read",
          component: {
            name: "el-input",
            size: "small"
          }
        },
         {
          title: "品名*",
          sortable: true,
          key: "read",
          component: {
            name: "el-input",
            size: "small"
          }
        },
        {
          title: "合约*",
          key: "title",
          sortable: true,
          component: {
            name: "el-select",
            options: [
              {
                value: "王小虎",
                label: "王小虎"
              },
              {
                value: "王中虎",
                label: "王中虎"
              },
              {
                value: "王老虎",
                label: "王老虎"
              }
            ],
            size: "small"
          }
        },
        {
          title: "方向",
          key: "date",
          sortable: true,
          component: {
            name: "el-select",
            options: [
              {
                value: "王小虎",
                label: "王小虎"
              },
              {
                value: "王中虎",
                label: "王中虎"
              },
              {
                value: "王老虎",
                label: "王老虎"
              }
            ],
            size: "small"
          }
        },
        {
          title: "开平",
          key: "date",
          sortable: true,
          component: {
            name: "el-select",
            options: [
              {
                value: "王小虎",
                label: "王小虎"
              },
              {
                value: "王中虎",
                label: "王中虎"
              },
              {
                value: "王老虎",
                label: "王老虎"
              }
            ],
            size: "small"
          }
        },
         {
          title: "投保",
          key: "date",
          sortable: true,
          component: {
            name: "el-select",
            options: [
              {
                value: "王小虎",
                label: "王小虎"
              },
              {
                value: "王中虎",
                label: "王中虎"
              },
              {
                value: "王老虎",
                label: "王老虎"
              }
            ],
            size: "small"
          }
        },
        {
          title: "成交价",
          key: "name",
          sortable: true,
          component: {
            name: "el-input",
            size: "small"
          }
        },
        {
          title: "手数",
          key: "address",
          sortable: true,
          component: {
            name: "el-input",
            size: "small"
          }
        },
        {
          title: "成交额",
          sortable: true,
          key: "read",
          component: {
            name: "el-input",
            size: "small"
          }
        },
        {
          title: "手续费",
          key: "title",
          sortable: true,
          component: {
            name: "el-input",
            size: "small"
          }
        },
        {
          title: "平仓盈亏",
          key: "context",
          sortable: true,
          component: {
            name: "el-input",
            size: "small"
          }
        },
         {
          title: "权利金收支",
          key: "context",
          sortable: true,
          component: {
            name: "el-input",
            size: "small"
          }
        }
      ],
      spotData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        }
      ],
      // 修改
      handleFilter_editQqcjVisible:false,
      // 复制
      handleFilter_copyQqcjVisible:false,
      // 调整
      handleFilter_adjustQqcjVisible:false,
      options1: [
        {
          value: '选项1',
          label: '黄金糕'
        }, {
          value: '选项2',
          label: '双皮奶'
        }, {
          value: '选项3',
          label: '蚵仔煎'
        }, {
          value: '选项4',
          label: '龙须面'
        }, {
          value: '选项5',
          label: '北京烤鸭'
        }
      ],
      value: '',
      edit_Risk_OrderFormVisible: false,
      egForm: {},
      columns: [
        {
          title: '日期',
          key: 'date',
          component: {
            name: 'el-date-picker',
            size: 'small'
          },
          sortable: true
        },
        {
          title: '姓名',
          key: 'name',
          component: {
            name: 'el-select',
            options: [
              {
                value: '王小虎',
                label: '王小虎'
              },
              {
                value: '王中虎',
                label: '王中虎'
              },
              {
                value: '王老虎',
                label: '王老虎'
              }
            ],
            size: 'small'
          },
          sortable: true
        },
        {
          title: '年龄',
          key: 'age',
          component: {
            name: 'el-select',
            options: [
              {
                value: '16',
                label: '16'
              },
              {
                value: '26',
                label: '26'
              },
              {
                value: '36',
                label: '36'
              }
            ],
            size: 'small'
          },
          sortable: true
        },
        {
          title: '地址',
          key: 'address',
          component: {
            name: 'el-input',
            size: 'small'
          },
          sortable: true
        }
      ],
      data: [
        {
          date: '2016-05-02',
          name: '王小虎',
          age: '16',
          address: '上海市普陀区金沙江路 1518 弄'
        },
        {
          date: '2016-05-04',
          name: '王小虎',
          age: '16',
          address: '上海市普陀区金沙江路 1517 弄'
        },
        {
          date: '2016-05-01',
          name: '王小虎',
          age: '16',
          address: '上海市普陀区金沙江路 1519 弄'
        },
        {
          date: '2016-05-03',
          name: '王小虎',
          age: '16',
          address: '上海市普陀区金沙江路 1516 弄'
        }
      ],
      columns2: [
        {
          title: '日期',
          key: 'date',
          width: '180',
          sortable: true
        },
        {
          title: '姓名',
          key: 'name',
          width: '180',
          sortable: true
        },
        {
          title: '地址',
          key: 'address',
          sortable: true
        }
      ],
      data2: [
        {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        },
        {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        },
        {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        },
        {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }
      ],
      options: {
        border: true
        //  defaultSort: {
        //   prop: 'date',
        //   order: 'descending'
        // }
      },
      options2: {
        border: true,
        highlightCurrentRow: true
      },
      options1: [
        {
          value: '选项1',
          label: '黄金糕'
        }, {
          value: '选项2',
          label: '双皮奶'
        }, {
          value: '选项3',
          label: '蚵仔煎'
        }, {
          value: '选项4',
          label: '龙须面'
        }, {
          value: '选项5',
          label: '北京烤鸭'
        }
      ],
      value: ''
    }
  },
  created() {
           this.tabledatas = [
               { title: '标题1', text: 's111sssa' },
               { title: '标题2', text: 'ss222ssa' },
           ]
           this.tabledatas.map(i => {
               i.show = false
               return i
           })
  },
  methods: {
    // 行内编辑
    handleCellDataChange ({ rowIndex, key, value, row }) {
      console.log(rowIndex)
      console.log(key)
      console.log(value)
      console.log(row)
    },
    handleUpload (file) {
      this.$import.xlsx(file)
        .then(({ header, results }) => {
          this.table.columns = header.map(e => {
            return {
              label: e,
              prop: e
            }
          })
          this.table.data = results
        })
      return false
    },
    // 单选
    handleCurrentChange (currentRow, oldCurrentRow) {
      console.log(currentRow)
      console.log(oldCurrentRow)
    },
    // 多选
    handleSelectionChange (selection) {
      console.log(selection)
    },
    // 清空当前页缓存并刷新此页面
    async handleCleanCacheAndRefreshCurrent () {
      this.keepAliveRemove(this.$route.name)
      await this.$nextTick()
      this.$router.replace('/refresh')
      },
    // 新增
    handleFilter_addQqcj(){
       this.$router.push({path: '/add_optionDeal'});
    },
    
     // 获取表格选中时的数据
      selectRow (val) {
        this.selectlistRow = val
      },
      // 增加行
      addRow () {
       	  var list = {
          rowNum:this.rowNum,
          post_id:[],
          require_des: '',
          text:''
   		 };
        this.tableData.unshift(list)
        this.rowNum += 1;
      },
      // 删除方法
      // 删除选中行
      delData () {
        for (let i = 0; i < this.selectlistRow.length; i++) {
          let val = this.selectlistRow
          val.forEach((val, index) => {
            this.tableData.forEach((v, i) => {
              if (val.rowNum === v.rowNum) {
                // i 为选中的索引
                this.tableData.splice(i, 1)
              }
            })
          })
        }
        // 删除完数据之后清除勾选框
        this.$refs.table.clearSelection()
      },
  // 修改
  handleFilter_editQqcj(){
      this.handleFilter_editQqcjVisible = true
    },
  //  复制
  handleFilter_copyQqcj(){
      this.handleFilter_copyQqcjVisible = true
    },
  // 调整
  handleFilter_adjustQqcj(){
      this.handleFilter_adjustQqcjVisible = true
    },

    }
  }
</script>
